<?php
class EnviarController extends Zend_Controller_Action
{
    function indexAction()
    {
            {
                    //$this->_helper->viewRenderer->setNoRender();
                    //$this->_helper->layout->disableLayout();
                    $this->view->titulo = "Contactanos";
                    $formulario = $this->_request->getParams();
                        $body = "<table>";
                        $body .="<tr><th>Nombre</th><td>".$formulario['nombre']."</td></tr>";
                        $body .="<tr><th>Fono</th><td>".$formulario['fono']."</td></tr>";
                        $body .="<tr><th>Correo</th><td>".$formulario['correo']."</td></tr>";
                        $body .="<tr><th>Comentario</th><td>".$formulario['comentario']."</td></tr>";
                        $body .="</table>";
                        $config = array('name' => 'mail.laserbellefemme.cl');
                        $transport = new
                        Zend_Mail_Transport_Smtp($transport, $config);
                        Zend_Mail::setDefaultFrom('contacto@laserbellefemme.cl', 'Contacto Laserbellefemme');
                        $mail = new Zend_Mail();
                        $mail->setSubject('Contacto Laser BelleFemme');
                        $mail->setFrom('laserbellefemme.cl', 'www.laserbellefemme.cl' );
                        $mail->addTo( 'laserbellefemme.cl', 'www.laserbellefemme.cl' );
                        $mail->addCc($formulario['correo'], $formulario['nombre']);
                        $mail->addBcc( 'aucanwincaman@hotmail.com', 'Pablo Sandoval' );
                        $mail->addBcc( 'marialuisacsl0311@gmail.com', 'Maria Luisa Soto' );
                        $mail->addBcc( 'psandovaltec@gmail.com', 'Pablo Sandoval' );
                        $mail->addBcc( 'contacto@laserbellefemme.cl', 'Contacto LaserBelle Femme' );
                        $mail->setBodyHtml( $body );
                        $mail->send();

                    //$this->_redirect('enviar');
            }
    }
}
?>
